package de.mhu.mandalaui.attributes;

import java.io.PrintWriter;

public class NamedBooleanAttribute extends BooleanAttribute {

	private Attribute bind;

	public NamedBooleanAttribute() {
		super();
	}

	public NamedBooleanAttribute(String name) {
		super(name);
	}

	public NamedBooleanAttribute(String name, Attribute bind) {
		super(name);
		this.bind = bind;
	}

	public Attribute getBind() {
		return bind;
	}

	public void setBind(Attribute bind) {
		this.bind = bind;
	}

	public boolean needFunctionImplementation() {
		return bind == null;
	}
	
	public void renderBindCall(PrintWriter out) {
		if (bind == null)
			super.renderBindCall(out);
			//out.print(getName());
		else
			bind.renderBindCall(out);
	}

	
}
